import OSS from 'ali-oss';
import { Controller } from 'egg';
import { v4 as uuidv4 } from 'uuid';


export default class ApiController extends Controller {
    constructor(ctx) {
        super(ctx);
    }

    async aiText() {
        const aiText = this.ctx.validateReq('common.aiText');
        console.log(aiText, 'aiText')
        const result = await this.ctx.curl('https://wenxin.baidu.com/moduleApi/portal/api/rest/1.0/ernie/3.0.25/zeus', {
            method: 'POST',
            dataType: 'json',
            data: aiText?.body
        });
        this.ctx.success({
            data: result?.data,
        });
    }

}
